#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <fcntl.h>
#include <stdbool.h>
#include <errno.h>
#include <string.h>

int main(int argc, char const *argv[]) // a.out file
{
    int fd = open(argv[1], O_RDWR|O_CREAT|O_TRUNC, 0644);

    write(fd, "abc", 3);
    lseek(fd, 10000L, SEEK_CUR);
    write(fd, "xyz", 3);

    close(fd);

    return 0;
}
